



TargetMode_Default := 0
TargetMode_Release := 1

TargetMode := $(TargetMode_Release)



# C预编译宏
C_DEFINES := \
USE_HAL_DRIVER \
STM32H750xx \
DATA_IN_D2_SRAM \
__TARGET_FPU_VFP

ifeq ($(TargetMode),$(TargetMode_Default))
C_DEFINES += EnableStackCheck
endif

# CPP预编译宏
CPP_DEFINES := $(C_DEFINES)

# ASM预编译宏
ASM_DEFINES :=

# 编译生成路径
BUILD_DIR := obj/gcc

# 控制是否开启利于Debug的选项
ifeq ($(TargetMode),$(TargetMode_Default))
DEBUG := 1
endif
ifeq ($(TargetMode),$(TargetMode_Release))
DEBUG := 1
endif

# 优化等级
ifeq ($(TargetMode),$(TargetMode_Default))
OPTIMIZATION := -O0
endif
ifeq ($(TargetMode),$(TargetMode_Release))
OPTIMIZATION := -O3
endif

# 编译选项
FLAGS := -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard -fno-strict-aliasing

# C与CPP与汇编的编译选项
C_CPP_ASM_FLAGS := -finput-charset=UTF-8 -fexec-charset=UTF-8

# CPP编译选项
CPP_FLAGS :=

# C编译选项
C_FLAGS := -std=gnu99

# ASM编译选项
ASM_FLAGS :=

# 链接器选项
LD_FLAGS := -TSTM32H7xx_FLASH.ld

# 编译器执行文件前缀
PREFIX := arm-none-eabi-

# 生成的目标名
TARGET := $(notdir $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST))))))

#库
LIBS := c m nosys

#库路径
LIB_PATHS :=

# 头文件路径
C_CPP_INCLUDE_PATHS := \
./Code/APP \
./Code/Package \
./Code/STM32 \
./Code/STM32/CMSIS \
./Code/STM32/STM32H7xx \
./Code/STM32/STM32H7xx_HAL_Driver/Inc \
./Code/BSP \
./Code/BSP/Instance \
./Code/BSP/InternalPeripherals/HAL \
./Code/BSP/InternalPeripherals/IP \
./Code/BSP/MemoryMalloc \
./Code/BSP/Peripherals \
./Code/H_Lib \
./Code/H_ThreadScheduler

# 汇编头文件路径
ASM_INCLUDE_PATHS :=

# C文件
C_SOURCES :=
C_SOURCES+=./Code/APP/app_main.c
C_SOURCES+=./Code/APP/StressTest.c
C_SOURCES+=./Code/BSP/Bootloader.c
C_SOURCES+=./Code/BSP/Crash.c
C_SOURCES+=./Code/BSP/Peripheral.c
C_SOURCES+=./Code/BSP/Instance/I_DebugPort.c
C_SOURCES+=./Code/BSP/Instance/I_W25Q_DualBank.c
C_SOURCES+=./Code/BSP/Instance/Peripherals_Instence.c
C_SOURCES+=./Code/BSP/InternalPeripherals/HAL/dma.c
C_SOURCES+=./Code/BSP/InternalPeripherals/HAL/tim.c
C_SOURCES+=./Code/BSP/InternalPeripherals/HAL/usart.c
C_SOURCES+=./Code/BSP/InternalPeripherals/IP/IP_DMA.c
C_SOURCES+=./Code/BSP/InternalPeripherals/IP/IP_DMA_Ext.c
C_SOURCES+=./Code/BSP/InternalPeripherals/IP/IP_PLL.c
C_SOURCES+=./Code/BSP/InternalPeripherals/IP/IP_USART.c
C_SOURCES+=./Code/BSP/InternalPeripherals/IP/IP_USART_Ext.c
C_SOURCES+=./Code/BSP/MemoryMalloc/MemoryMalloc.c
C_SOURCES+=./Code/BSP/MemoryMalloc/MemoryMalloc_AXISRAM.c
C_SOURCES+=./Code/BSP/MemoryMalloc/MemoryMalloc_D2SRAM.c
C_SOURCES+=./Code/BSP/MemoryMalloc/MemoryMalloc_D3SRAM.c
C_SOURCES+=./Code/BSP/MemoryMalloc/MemoryMalloc_DTCM.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_Event.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_Event_Ext.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_Ext.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_Lock.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_Lock_Ext.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_MessageQueue.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_MessageQueue_Ext.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_Queue.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_Queue_Ext.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_Semaphore.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_Semaphore_Ext.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_Thread.c
C_SOURCES+=./Code/H_ThreadScheduler/API/H_TS_Thread_Ext.c
C_SOURCES+=./Code/H_ThreadScheduler/LL/H_TS_LL.c
C_SOURCES+=./Code/H_ThreadScheduler/LL/H_TS_LL_Core.c
C_SOURCES+=./Code/H_ThreadScheduler/LL/H_TS_LL_Ext.c
C_SOURCES+=./Code/H_ThreadScheduler/LL/H_TS_LL_Memory.c
C_SOURCES+=./Code/H_Lib/H_FIFO.c
C_SOURCES+=./Code/H_Lib/H_FIFO_byte.c
C_SOURCES+=./Code/H_Lib/H_FIFO_uint16.c
C_SOURCES+=./Code/H_Lib/H_FIFO_uint32.c
C_SOURCES+=./Code/H_Lib/H_FIFO_uint64.c
C_SOURCES+=./Code/H_Lib/H_Malloc.c
C_SOURCES+=./Code/H_Lib/H_Memory.c
C_SOURCES+=./Code/H_Lib/H_MemoryMalloc.c
C_SOURCES+=./Code/H_Lib/H_String.c
C_SOURCES+=./Code/Package/H_FIFO_Builder/H_FIFO_Builder.c
C_SOURCES+=./Code/Package/H_Stream/H_Reader.c
C_SOURCES+=./Code/Package/H_Stream/H_Reader_Ext.c
C_SOURCES+=./Code/Package/H_Stream/H_Stream.c
C_SOURCES+=./Code/Package/H_Stream/H_Stream_Ext.c
C_SOURCES+=./Code/Package/H_Stream/H_Writer.c
C_SOURCES+=./Code/Package/H_Stream/H_Writer_Ext.c
C_SOURCES+=./Code/Package/NET_Interface/NET_Interface.c
C_SOURCES+=./Code/Package/NET_Interface/NET_Interface_Ext.c
C_SOURCES+=./Code/STM32/Entry.c
C_SOURCES+=./Code/STM32/main.c
C_SOURCES+=./Code/STM32/H_Printf.c
C_SOURCES+=./Code/STM32/stm32h7xx_hal_msp.c
C_SOURCES+=./Code/STM32/stm32h7xx_it.c
C_SOURCES+=./Code/STM32/stm32xxx_it.c
C_SOURCES+=./Code/STM32/stm32xxx_Time.c
C_SOURCES+=./Code/STM32/system_stm32h7xx.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma_ex.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.c
C_SOURCES+=./Code/STM32/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.c

# CPP文件
CPP_SOURCES :=

# 汇编文件
ASM_SOURCES := \
./Code/H_ThreadScheduler/LL/ASM/H_TS_LL_ThreadSchedule_ASM_gcc.s \
./Code/STM32/stm32h7xx_it_ASM_gcc.s \
./Code/BSP/Bootloader_ASM_gcc.s \
./Code/STM32/STM32H7xx/gcc/startup_stm32h750xx.s

# OBJ文件
OBJ_SOURCES :=




# sinclude ./AutoMK/Auto_C_CPP_IncludePaths.mk
# sinclude ./AutoMK/Auto_ASM_IncludePaths.mk
# sinclude ./AutoMK/Auto_LIB_Paths.mk
# sinclude ./AutoMK/Auto_C_Sources.mk
# sinclude ./AutoMK/Auto_CPP_Sources.mk
# sinclude ./AutoMK/Auto_ASM_Sources.mk
# sinclude ./AutoMK/Auto_OBJs.mk
# sinclude ./AutoMK/Auto_LIBs.mk



